package com.rfid.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.rfid.service.RFIDReadInfoService;

/**
 * start按钮的监听
 * @author hhf
 */
public class StartListener implements ActionListener {

	private LogListener listCmp;
	
	
	@Override
	public void actionPerformed(ActionEvent e) {
		final RFIDReadInfoService service = RFIDReadInfoService.getInstance();
		if(!service.getState()) {
			service.getLogListeners().add(listCmp);
			service.start();
		}
	}

	/**
	 * @return the listCmp
	 */
	public LogListener getListCmp() {
		return listCmp;
	}

	/**
	 * @param listCmp the listCmp to set
	 */
	public void setListCmp(LogListener listCmp) {
		this.listCmp = listCmp;
	}


	
	
}
